package edu.hawaii.solardecathlon.page.lights;

import java.util.ArrayList;
import org.apache.wicket.ResourceReference;
import org.apache.wicket.model.Model;
import edu.hawaii.solardecathlon.page.BasePage;
import edu.hawaii.solardecathlon.page.electricity.ElectricityPage;
import edu.hawaii.solardecathlon.page.status.OverAllStatus;
import edu.hawaii.solardecathlon.page.status.OverAllStatusPanel;

/**
 * Lights page.
 * 
 * @author Michael Cera
 */
public class LightsPage extends BasePage {

  /** Support serialization. */
  private static final long serialVersionUID = 1L;

  /**
   * Creates the lights page.
   */
  public LightsPage() {

    // On and off button icons.
    ResourceReference powerOn = new ResourceReference(BasePage.class, "images/power_on.png");
    ResourceReference powerOff = new ResourceReference(BasePage.class, "images/power_off.png");

    // Creates the OverAllStatusPanel
    ArrayList<OverAllStatus> list = new ArrayList<OverAllStatus>();

    list.add(new OverAllStatus("Living Room", powerOn));
    list.add(new OverAllStatus("Dining Room", powerOn));
    list.add(new OverAllStatus("Bedroom", powerOff));
    list.add(new OverAllStatus("Kitchen", powerOff));
    list.add(new OverAllStatus("Bathroom", powerOff));
    list.add(new OverAllStatus("Energy Consumption per hour", "1 kWh", ElectricityPage.class));

    add(new OverAllStatusPanel("LightsStatus", new Model<String>("LightsStatus"), list));
    add(new LightsPageMain("LightsMain", new Model<String>("LightsMain")));
  }
}